using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Coronary_angiography_Basic_InformationMap : EntityTypeConfiguration<Coronary_angiography_Basic_Information>
    {
        public Coronary_angiography_Basic_InformationMap()
        {
            // Primary Key
            this.HasKey(t => t.CABI_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.CABI_Surgery)
                .HasMaxLength(20);

            this.Property(t => t.CABI_Assistant)
                .HasMaxLength(20);

            this.Property(t => t.CABI_Anesthesia)
                .HasMaxLength(50);

            this.Property(t => t.CABI_Intubate)
                .HasMaxLength(50);

            this.Property(t => t.CABI_Medication)
                .HasMaxLength(100);

            this.Property(t => t.CABI_Administration_Route)
                .HasMaxLength(50);

            this.Property(t => t.CABI_Contrast_Agent)
                .HasMaxLength(50);

            this.Property(t => t.CABI_Operating_time)
                .HasMaxLength(100);

            this.Property(t => t.CABI_Fluoroscopy_time)
                .HasMaxLength(50);

            this.Property(t => t.CABI_Contrast_AgentOther)
                .HasMaxLength(50);

            this.Property(t => t.CABI_MedicationContrast)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.CABI_Pathway)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("Coronary_angiography_Basic_Information");
            this.Property(t => t.CABI_ID).HasColumnName("CABI_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.CABI_Surgery).HasColumnName("CABI_Surgery");
            this.Property(t => t.CABI_Assistant).HasColumnName("CABI_Assistant");
            this.Property(t => t.CABI_Anesthesia).HasColumnName("CABI_Anesthesia");
            this.Property(t => t.CABI_Intubate).HasColumnName("CABI_Intubate");
            this.Property(t => t.CABI_Medication).HasColumnName("CABI_Medication");
            this.Property(t => t.CABI_Administration_Route).HasColumnName("CABI_Administration_Route");
            this.Property(t => t.CABI_Contrast_Agent).HasColumnName("CABI_Contrast_Agent");
            this.Property(t => t.CABI_Operating_time).HasColumnName("CABI_Operating_time");
            this.Property(t => t.CABI_Operating_time_detail).HasColumnName("CABI_Operating_time_detail");
            this.Property(t => t.CABI_Fluoroscopy_time).HasColumnName("CABI_Fluoroscopy_time");
            this.Property(t => t.CABI_Fluoroscopy_time_detail).HasColumnName("CABI_Fluoroscopy_time_detail");
            this.Property(t => t.CABI_ContrastDose).HasColumnName("CABI_ContrastDose");
            this.Property(t => t.CABI_Contrast_AgentOther).HasColumnName("CABI_Contrast_AgentOther");
            this.Property(t => t.CABI_MedicationContrast).HasColumnName("CABI_MedicationContrast");
            this.Property(t => t.CABI_Pathway).HasColumnName("CABI_Pathway");
        }
    }
}
